/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package seGobangClient;

import config.Configuration;

/**
 *
 * @author plus
 */
public class Options {
    public static int SysConfig_2DGraphic=0;	//2D显示模式标示
    public static int SysConfig_3DGraphic=1;	//3D显示模式标示
    public int GraphicMode;                     //显示模式
    public int MusicVolum;			//音乐音量(0-100)
    public int SFXVolum;			//音效音量
    private Configuration conf;
    public void setDefault(){
	GraphicMode=SysConfig_2DGraphic;
	MusicVolum=50;
	SFXVolum=50;
        conf=new Configuration();
    }

    public Options(int GraphicMode, int MusicVolum, int SFXVolum) {
        this.GraphicMode = GraphicMode;
        this.MusicVolum = MusicVolum;
        this.SFXVolum = SFXVolum;
    }

    public Options() {
        setDefault();
    }
    
    public void LoadFromXML(){
        Configuration config=new Configuration();
        this.GraphicMode=Integer.parseInt(config.getData("GraphicMode"));
        this.MusicVolum=Integer.parseInt(config.getData("MusicVolum"));
        this.SFXVolum=Integer.parseInt(config.getData("SFXVolum"));
    }
    public void SaveToXML(){
        Configuration config=new Configuration();
        config.setData("GraphicMode", GraphicMode+"");
        config.setData("MusicVolum", MusicVolum+"");
        config.setData("SFXVolum", SFXVolum+"");
    }
}
